package objectAdapter;

/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: Phone
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2021/12/21 14:33
 * @version: 1.0
 */
public class Phone {

    public void charging(IVoltage5V iVoltage5V){

        if (iVoltage5V.output5V() == 5){
            System.out.println("电压为5V，可以充电~~");
        }else if (iVoltage5V.output5V() > 5){
            System.out.println("电压大于5V,不可以充电~~");
        }
    }
}
